package com.fyh.feign;

import com.fyh.entity.chat.SimpleContact;
import com.fyh.entity.common.Result;
import com.fyh.feign.fallback.ChatUserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.awt.color.ICC_Profile;
import java.util.List;

@FeignClient(name = "service-user", fallback = ChatUserFeignClientFallback.class, path = "/user")
public interface ChatUserFeignClient {

    /**
     * 获取联系人头像和昵称
     *
     * @param simpleContactList
     * @return
     */
    @PostMapping("/getContactListAvatarPath")
    Result<List<SimpleContact>> getContactListAvatarPath(@RequestBody List<SimpleContact> simpleContactList);

    /**
     * 获取昵称
     *
     * @param userId
     * @return
     */
    @GetMapping("/getNickname")
    Result<String> getNickname(@RequestParam("userId") Long userId);
}
